// 确保全局可访问
window.mockData = {
    // 用户信息
    user: {
        name: '管理员',
        username: 'admin',
        avatar: 'https://randomuser.me/api/portraits/men/32.jpg',
        role: 'admin'
    },

    // 通知信息
    notifications: [
        {
            id: 1,
            title: '系统通知',
            content: '您有新的舆情预警，请及时查看',
            time: '2023-05-15 10:30',
            read: false
        },
        {
            id: 2,
            title: '系统更新',
            content: '系统已更新到最新版本',
            time: '2023-05-14 16:45',
            read: true
        },
        {
            id: 3,
            title: '数据采集完成',
            content: '您的数据采集任务已完成',
            time: '2023-05-13 09:20',
            read: false
        }
    ],

    // 仪表盘数据
    dashboard: {
        stats: {
            total_comments: 395000,
            total_visits: 25450,
            user_count: 13256,
            alert_count: 35
        },
        trend: {
            dates: Array.from({length: 30}, (_, i) => {
                const date = new Date();
                date.setDate(date.getDate() - 29 + i);
                return date.toLocaleDateString('zh-CN', {month: 'short', day: 'numeric'});
            }),
            total: [31, 40, 28, 51, 42, 109, 100, 120, 80, 95, 75, 150, 160, 170, 140, 190, 200, 170, 190, 220, 230, 210, 240, 250, 270, 280, 260, 290, 300, 310],
            positive: [20, 25, 18, 35, 30, 75, 70, 80, 55, 65, 50, 100, 110, 120, 95, 130, 140, 120, 130, 150, 160, 140, 160, 170, 180, 190, 175, 200, 210, 220],
            negative: [11, 15, 10, 16, 12, 34, 30, 40, 25, 30, 25, 50, 50, 50, 45, 60, 60, 50, 60, 70, 70, 70, 80, 80, 90, 90, 85, 90, 90, 90]
        },
        sentiment: {
            positive: 256750,
            neutral: 79000,
            negative: 59250
        },
        topics: [
            {title: '经济发展新动向', hot: 95, sentiment: 'positive'},
            {title: '科技创新政策解读', hot: 85, sentiment: 'positive'},
            {title: '环保问题引发关注', hot: 75, sentiment: 'negative'},
            {title: '教育改革新举措', hot: 65, sentiment: 'neutral'},
            {title: '医疗健康新进展', hot: 55, sentiment: 'positive'}
        ],
        keywords: [
            {name: '经济', value: 100},
            {name: '科技', value: 85},
            {name: '政策', value: 80},
            {name: '创新', value: 75},
            {name: '发展', value: 70},
            {name: '数字化', value: 65},
            {name: '转型', value: 60},
            {name: '产业', value: 55},
            {name: '金融', value: 50},
            {name: '教育', value: 45},
            {name: '医疗', value: 40},
            {name: '环保', value: 35},
            {name: '智能', value: 30},
            {name: '制造', value: 25},
            {name: '消费', value: 20}
        ],
        sources: [
            {name: '微博', value: 35},
            {name: '新闻网站', value: 25},
            {name: '微信', value: 20},
            {name: '论坛', value: 15},
            {name: '其他', value: 5}
        ],
        regions: [
            {name: '北京', value: 980},
            {name: '上海', value: 920},
            {name: '广东', value: 850},
            {name: '江苏', value: 720},
            {name: '浙江', value: 760},
            {name: '山东', value: 680},
            {name: '河南', value: 380},
            {name: '四川', value: 520},
            {name: '湖北', value: 410},
            {name: '湖南', value: 450}
        ]
    },

    // 预警数据
    alerts: [
        {
            id: 1,
            title: '重要舆情预警',
            level: 'high',
            content: '发现重要舆情信息...',
            time: '2024-03-20 10:30:00'
        },
        {
            id: 2,
            title: '一般舆情预警',
            level: 'medium',
            content: '发现一般舆情信息...',
            time: '2024-03-20 09:15:00'
        }
    ],

    // 事件数据
    events: [
        {
            id: 1,
            title: '重要事件1',
            status: 'active',
            type: 'important',
            createTime: '2024-03-20 08:00:00'
        },
        {
            id: 2,
            title: '一般事件1',
            status: 'pending',
            type: 'normal',
            createTime: '2024-03-19 15:30:00'
        }
    ]
}; 